#include <stdio.h>

#define DEBUG

#define ALPHABET_NUM 26
#define MAX_LEN	100

int M, N, P;

char board[ALPHABET_NUM] = {0};

int main(void)
{
#ifdef DEBUG
	freopen("bin/2.4.in", "r", stdin);
#endif

	scanf("%d %d %d", &M, &N, &P);

	int i, j;
	char tmp[MAX_LEN+1];
	for (i = 0; i < M; ++i)
	{
		scanf("%s", tmp);
		for (j = 0; j < N; ++j)
		{
			board[tmp[j] - 'A']++;
		}
	}
	for (i = 0; i < P; ++i)
	{
		scanf("%s", tmp);
		for (j = 0; j < strlen(tmp); ++j)
			board[tmp[j] - 'A']--;
	}
	for (i = 0; i < ALPHABET_NUM; ++i)
	{
		if (board[i] == 0)
			continue;
		else
		{
			while(board[i]-- != 0)
				printf("%c", i + 'A');
		}
	}
	printf("\n");

	return 0;
}
